import 'package:flutter/material.dart';
import 'dart:ui';

import 'package:flutter_demo/router/router.dart';

class Header extends StatefulWidget {
  Header({Key key}) : super(key: key);

  @override
  _HeaderState createState() => _HeaderState();
}

class _HeaderState extends State<Header> {
  @override
  Widget build(BuildContext context) {
    return Positioned(
      height: 44,
      width: MediaQuery.of(context).size.width,
      top: MediaQueryData.fromWindow(window).padding.top,
      child: Container(
          decoration: BoxDecoration(
            color: Color(0xFF26262C),
          ),
          child: Padding(
            padding: EdgeInsets.symmetric(horizontal: 16),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                InkWell(
                  onTap: () {
                    RouterConfig.navigater(context, type: 'back');
                  },
                  child: Image.asset(
                    'images/15.png',
                    width: 22,
                    height: 22,
                  ),
                ),
                Text(
                  '账号与安全',
                  style: TextStyle(color: Colors.white, fontSize: 18),
                ),
                Text('')
              ],
            ),
          )),
    );
  }
}
